//
//  LYRequestManager.h
//  artist
//
//  Created by laotang on 16/4/4.
//  Copyright © 2016年 viviyoo. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <AFNetworking.h>
@class LYRequestInfo;
#define SLYRequestManager [LYRequestManager requestManager]

@interface LYRequestManager : AFHTTPSessionManager

+ (instancetype _Nullable)requestManager;


- (NSURLSessionDataTask * _Nonnull)getDataWithRelativeUrl:(NSString * _Nullable)relativeUrl Parameters:(id _Nullable)parameters success:(void (^_Nullable)(id _Nonnull responseObject))success failure:(void (^_Nullable )(NSURLSessionDataTask * _Nullable dataTask, NSError * _Nonnull error))failure;


- (NSURLSessionDataTask *_Nonnull)postWithRelativeUrl:(NSString *_Nullable)relativeUrl Parameters:(_Nullable id)parameters success:(void (^_Nullable)(LYRequestInfo *_Nullable requestInfo))success failure:(void (^_Nullable)(NSURLSessionDataTask * _Nullable dataTask, NSError * _Nonnull error))failure;

-(NSURLSessionDataTask * _Nonnull)uploadDataWithRelativeUrl:(NSString *_Nullable)relativeUrl Parameters:(_Nullable id)parameters constructingBodyWithBlock:(void (^_Nullable)( id<AFMultipartFormData>  _Nonnull formData))formDataHandle success:(void (^_Nullable)(LYRequestInfo *_Nullable requestInfo))success failure:(void (^_Nullable)(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error))failuer;
@end
